﻿import request from '/@/utils/request';
enum Api {
  AddMessage = '/api/message/add',
  DeleteMessage = '/api/message/delete',
  UpdateMessage = '/api/message/update',
  PageMessage = '/api/message/page',
  DetailMessage = '/api/message/detail',
  GetCategoryclassifyDropdown = '/api/message/CategoryclassifyDropdown',
}

// 增加信息
export const addMessage = (params?: any) =>
	request({
		url: Api.AddMessage,
		method: 'post',
		data: params,
	});

// 删除信息
export const deleteMessage = (params?: any) => 
	request({
			url: Api.DeleteMessage,
			method: 'post',
			data: params,
		});

// 编辑信息
export const updateMessage = (params?: any) => 
	request({
			url: Api.UpdateMessage,
			method: 'post',
			data: params,
		});

// 分页查询信息
export const pageMessage = (params?: any) => 
	request({
			url: Api.PageMessage,
			method: 'post',
			data: params,
		});

// 详情信息
export const detailMessage = (id: any) => 
	request({
			url: Api.DetailMessage,
			method: 'get',
			data: { id },
		});

export const getCategoryclassifyDropdown = () =>
		request({
		url: Api.GetCategoryclassifyDropdown,
		method: 'get'
		});

